package de.metalcon.connectneo4j.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.RootPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Connectneo4j implements EntryPoint {
	Button loadGraph = new Button("los geht es");
	public void onModuleLoad() {
		RootPanel.get("content").add(loadGraph);
		
		loadGraph.addClickHandler(new ClickHandler(){
			public void onClick(ClickEvent event){
				Connector connection = new Connector();
				DialogBox dialog = new DialogBox();
				dialog.setText("Dialog text");
				dialog.setModal(false); // sperrt ansonsten alels außer dem dialog. 
				dialog.center();
				dialog.show();
				dialog.add(connection);
				
			}
		});
		
	}

}
